package com.ruoyi.web.tdm.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.tdm.mapper.TdmHplcMsTofMapper;
import com.ruoyi.web.tdm.domain.TdmHplcMsTof;
import com.ruoyi.web.tdm.service.ITdmHplcMsTofService;

/**
 * HPLC-MS/TOFService业务层处理
 *
 * @author ly
 * @date 2022-03-11
 */
@Service
public class TdmHplcMsTofServiceImpl implements ITdmHplcMsTofService
{
    @Autowired
    private TdmHplcMsTofMapper tdmHplcMsTofMapper;

    /**
     * 查询HPLC-MS/TOF
     *
     * @param id HPLC-MS/TOF主键
     * @return HPLC-MS/TOF
     */
    @Override
    public TdmHplcMsTof selectTdmHplcMsTofById(Long id)
    {
        return tdmHplcMsTofMapper.selectTdmHplcMsTofById(id);
    }

    /**
     * 查询HPLC-MS/TOF列表
     *
     * @param tdmHplcMsTof HPLC-MS/TOF
     * @return HPLC-MS/TOF
     */
    @Override
    public List<TdmHplcMsTof> selectTdmHplcMsTofList(TdmHplcMsTof tdmHplcMsTof)
    {
        return tdmHplcMsTofMapper.selectTdmHplcMsTofList(tdmHplcMsTof);
    }

    /**
     * 新增HPLC-MS/TOF
     *
     * @param tdmHplcMsTof HPLC-MS/TOF
     * @return 结果
     */
    @Override
    public int insertTdmHplcMsTof(TdmHplcMsTof tdmHplcMsTof)
    {
        tdmHplcMsTof.setCreateTime(DateUtils.getNowDate());
        return tdmHplcMsTofMapper.insertTdmHplcMsTof(tdmHplcMsTof);
    }

    /**
     * 修改HPLC-MS/TOF
     *
     * @param tdmHplcMsTof HPLC-MS/TOF
     * @return 结果
     */
    @Override
    public int updateTdmHplcMsTof(TdmHplcMsTof tdmHplcMsTof)
    {
        tdmHplcMsTof.setUpdateTime(DateUtils.getNowDate());
        return tdmHplcMsTofMapper.updateTdmHplcMsTof(tdmHplcMsTof);
    }

    /**
     * 批量删除HPLC-MS/TOF
     *
     * @param ids 需要删除的HPLC-MS/TOF主键
     * @return 结果
     */
    @Override
    public int deleteTdmHplcMsTofByIds(Long[] ids)
    {
        return tdmHplcMsTofMapper.deleteTdmHplcMsTofByIds(ids);
    }

    /**
     * 删除HPLC-MS/TOF信息
     *
     * @param id HPLC-MS/TOF主键
     * @return 结果
     */
    @Override
    public int deleteTdmHplcMsTofById(Long id)
    {
        return tdmHplcMsTofMapper.deleteTdmHplcMsTofById(id);
    }
}
